package com.yunsc.store.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yunsc.common.utils.PageResult;
import com.yunsc.store.dto.QueryUserParamsDTO;
import com.yunsc.store.entity.YunscUserBalanceLogEntity;

/**
 * 用户余额变动明细表
 *
 * @author adan
 * @email 2028038953@qq.com
 * @date 2024-04-22 11:35:51
 */
public interface YunscUserBalanceLogService extends IService<YunscUserBalanceLogEntity> {

    /**
     * 查询用户余额变动明细
     *
     * @param userId 用户ID
     * @param page   页码
     * @return 余额变动明细分页数据
     */
    PageResult<YunscUserBalanceLogEntity> queryUserBalanceLog(Integer userId, Integer page);

    boolean insertUserBalanceLog(int userId, int scene, String orderNo, String payPrice, int storeId);

    void addUserBalanceLog(int userId, int scene, String remark, String msg, String payPrice, int storeId);


    /**
     * 查询用户余额变动明细
     *
     * @param param  查询参数
     * @param storeId 门店ID
     * @return 余额变动明细分页数据
     */
    PageResult<YunscUserBalanceLogEntity> queryBalanceLog(QueryUserParamsDTO param, Integer storeId);
}

